Skip to content

chore(banner): add opt-out#911

Open
avivkeller wants to merge 4 commits into
mainfrom
opt-banner-out
Open

chore(banner): add opt-out#911
avivkeller wants to merge 4 commits into
mainfrom
opt-banner-out

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Ref: nodejs/nodejs.org#9008

Implements the onClose logic needed by nodejs/nodejs.org#9008.

@avivkeller
avivkeller requested a review from a team as a code owner July 17, 2026 22:27
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only announcement behavior with localStorage; main product change is showing a single banner instead of multiple stacked banners.

Overview
Announcement banners can be dismissed, with the choice stored in localStorage (global index banners use the same banner-dismissal key as nodejs.org). Updated @node-core/ui-components to ^1.7.2 so the shared Banner supports onClose (“Close banner”).

The old AnnouncementBanner stack (lazy remote load, multiple stacked banners, separate loadBanners) is replaced by a client-only Banner component and useBanners hook: one active banner at a time (global index first, then version-specific), date filtering, and re-show when remote text changes. Layout renders {CLIENT && <Banner />} instead of RemoteLoadableBanner. E2E coverage adds close-button visibility and dismissal persistence across reloads.

Reviewed by Cursor Bugbot for commit 5ddf756. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Jul 18, 2026 10:58pm

Request Review

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.01%. Comparing base (4f07fee) to head (5ddf756).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
e2e/announcement-banner.spec.js 0.00% 36 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
+ Coverage   85.19%   86.01%   +0.82%     
==========================================
  Files         180      188       +8     
  Lines       16570    17179     +609     
  Branches     1514     1539      +25     
==========================================
+ Hits        14116    14776     +660     
+ Misses       2444     2396      -48     
+ Partials       10        7       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 93e4f67. Configure here.

Comment thread src/generators/web/ui/components/Banner.jsx
Comment thread src/generators/web/ui/hooks/useBanners.mjs
Comment thread src/generators/web/ui/hooks/useBanners.mjs
Comment thread src/generators/web/ui/hooks/useBanners.mjs
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L291',
    'Buffer.alloc': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L435',
    'Buffer.allocUnsafe': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L449',
    'Buffer.allocUnsafeSlow': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L461',
...
    'agent.addRequest': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L356',
+   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L295',
-   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L326',
    'agent.createSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L427',
    'agent.destroy': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L660',
+   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L325',
-   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L484',
    'agent.keepSocketAlive': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L616',
    'agent.removeSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L555',
    'agent.reuseSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L652',
    'assert.assert': 'https://github.com/nodejs/node/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/nodejs/node/blob/HEAD/lib/async_hooks.js#L243',
...
    'server.address': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2585',
+   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L671',
+   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L681',
+   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L693',
-   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2718',
-   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L120',
-   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L122',
    'server.getConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2680',
    'server.listen': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2387',
    'server.ref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2823',
+   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L709',
-   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L124',
    'server.unref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2832',
+   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L677',
-   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2758',
    'server[kDeserialize]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2308',
    'server[kTransferList]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2281',
    'server[kTransfer]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2286',
+   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L716',
-   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2787',
    'serverresponse._finish': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L246',
    'serverresponse._implicitHeader': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L403',
    'serverresponse.assignSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L296',
    'serverresponse.detachSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L307',
    'serverresponse.statusCode': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L269',

Performance

Metric Base Head Diff
Elapsed time 1.28 s 1.31 s +30.00 ms (+2.34%)
User CPU time 2.75 s 2.88 s +130.00 ms (+4.73%)
System CPU time 340.00 ms 350.00 ms +10.00 ms (+2.94%)
Peak resident memory 348.51 MB 358.17 MB +9.66 MB (+2.77%)

legacy-html Generator

Performance

Metric Base Head Diff
Elapsed time 12.46 s 18.23 s +5.77 s (+46.31%)
User CPU time 39.93 s 59.87 s +19.94 s (+49.94%)
System CPU time 1.60 s 2.61 s +1.01 s (+63.12%)
Peak resident memory 2.33 GB 2.21 GB -123.37 MB (-5.18%)

legacy-json Generator

Performance

Metric Base Head Diff
Elapsed time 10.23 s 7.11 s -3.12 s (-30.50%)
User CPU time 27.83 s 20.57 s -7.26 s (-26.09%)
System CPU time 2.06 s 1.72 s -340.00 ms (-16.50%)
Peak resident memory 1.69 GB 1.75 GB +53.72 MB (+3.10%)

llms-txt Generator

Performance

Metric Base Head Diff
Elapsed time 7.74 s 7.80 s +60.00 ms (+0.78%)
User CPU time 23.79 s 24.21 s +420.00 ms (+1.77%)
System CPU time 1.32 s 2.07 s +750.00 ms (+56.82%)
Peak resident memory 1.57 GB 1.61 GB +39.44 MB (+2.45%)

orama-db Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| orama-db.json | 8.90 MB | 8.90 MB | -1.00 B (-0.00%) |

Performance

Metric Base Head Diff
Elapsed time 8.38 s 8.63 s +250.00 ms (+2.98%)
User CPU time 23.44 s 25.46 s +2.02 s (+8.62%)
System CPU time 1.44 s 1.87 s +430.00 ms (+29.86%)
Peak resident memory 1.59 GB 1.61 GB +20.65 MB (+1.27%)

web Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| styles.css | 141.88 KB | 144.52 KB | +2.64 KB (+1.86%) |
| all.html | 21.27 MB | 21.27 MB | +33.00 B (+0.00%) |
| 404.html | 29.88 KB | 29.87 KB | -11.00 B (-0.04%) |
| addons.html | 274.72 KB | 274.71 KB | -11.00 B (-0.00%) |
| assert.html | 347.03 KB | 347.02 KB | -11.00 B (-0.00%) |
| async_context.html | 191.78 KB | 191.77 KB | -11.00 B (-0.01%) |
| async_hooks.html | 162.94 KB | 162.93 KB | -11.00 B (-0.01%) |
| buffer.html | 955.22 KB | 955.21 KB | -11.00 B (-0.00%) |
| child_process.html | 404.88 KB | 404.87 KB | -11.00 B (-0.00%) |
| cli.html | 518.94 KB | 518.93 KB | -11.00 B (-0.00%) |
| cluster.html | 204.12 KB | 204.11 KB | -11.00 B (-0.01%) |
| console.html | 149.79 KB | 149.78 KB | -11.00 B (-0.01%) |
| crypto.html | 1.20 MB | 1.20 MB | -11.00 B (-0.00%) |
| debugger.html | 100.67 KB | 100.66 KB | -11.00 B (-0.01%) |
| deprecations.html | 513.71 KB | 513.70 KB | -11.00 B (-0.00%) |
| dgram.html | 219.14 KB | 219.13 KB | -11.00 B (-0.00%) |
| diagnostics_channel.html | 329.92 KB | 329.91 KB | -11.00 B (-0.00%) |
| dns.html | 319.61 KB | 319.60 KB | -11.00 B (-0.00%) |
| documentation.html | 37.93 KB | 37.92 KB | -11.00 B (-0.03%) |
| domain.html | 106.45 KB | 106.44 KB | -11.00 B (-0.01%) |
| dtls.html | 161.34 KB | 161.33 KB | -11.00 B (-0.01%) |
| embedding.html | 59.32 KB | 59.31 KB | -11.00 B (-0.02%) |
| environment_variables.html | 43.93 KB | 43.92 KB | -11.00 B (-0.02%) |
| errors.html | 495.92 KB | 495.91 KB | -11.00 B (-0.00%) |
| esm.html | 158.92 KB | 158.91 KB | -11.00 B (-0.01%) |
| events.html | 478.85 KB | 478.84 KB | -11.00 B (-0.00%) |
| ffi.html | 143.96 KB | 143.95 KB | -11.00 B (-0.01%) |
| fs.html | 1.66 MB | 1.66 MB | -11.00 B (-0.00%) |
| globals.html | 236.61 KB | 236.60 KB | -11.00 B (-0.00%) |
| http.html | 815.67 KB | 815.66 KB | -11.00 B (-0.00%) |
| http2.html | 837.99 KB | 837.97 KB | -11.00 B (-0.00%) |
| https.html | 154.81 KB | 154.80 KB | -11.00 B (-0.01%) |
| index.html | 40.39 KB | 40.38 KB | -11.00 B (-0.03%) |
| inspector.html | 179.31 KB | 179.29 KB | -11.00 B (-0.01%) |
| intl.html | 58.03 KB | 58.02 KB | -11.00 B (-0.02%) |
| module.html | 349.32 KB | 349.31 KB | -11.00 B (-0.00%) |
| modules.html | 185.39 KB | 185.38 KB | -11.00 B (-0.01%) |
| n-api.html | 811.89 KB | 811.88 KB | -11.00 B (-0.00%) |
| net.html | 455.71 KB | 455.70 KB | -11.00 B (-0.00%) |
| os.html | 151.79 KB | 151.78 KB | -11.00 B (-0.01%) |
| packages.html | 179.02 KB | 179.01 KB | -11.00 B (-0.01%) |
| path.html | 144.96 KB | 144.95 KB | -11.00 B (-0.01%) |
| perf_hooks.html | 408.65 KB | 408.64 KB | -11.00 B (-0.00%) |
| permissions.html | 62.74 KB | 62.73 KB | -11.00 B (-0.02%) |
| process.html | 718.90 KB | 718.89 KB | -11.00 B (-0.00%) |
| punycode.html | 64.09 KB | 64.08 KB | -11.00 B (-0.02%) |
| querystring.html | 66.29 KB | 66.28 KB | -11.00 B (-0.02%) |
| quic.html | 823.49 KB | 823.48 KB | -11.00 B (-0.00%) |
| readline.html | 264.42 KB | 264.41 KB | -11.00 B (-0.00%) |
| repl.html | 188.75 KB | 188.74 KB | -11.00 B (-0.01%) |
| report.html | 175.81 KB | 175.80 KB | -11.00 B (-0.01%) |
| single-executable-applications.html | 108.78 KB | 108.77 KB | -11.00 B (-0.01%) |
| sqlite.html | 311.83 KB | 311.82 KB | -11.00 B (-0.00%) |
| stream.html | 922.96 KB | 922.95 KB | -11.00 B (-0.00%) |
| stream_iter.html | 395.34 KB | 395.33 KB | -11.00 B (-0.00%) |
| string_decoder.html | 56.31 KB | 56.30 KB | -11.00 B (-0.02%) |
| synopsis.html | 42.56 KB | 42.55 KB | -11.00 B (-0.03%) |
| test.html | 895.26 KB | 895.25 KB | -11.00 B (-0.00%) |
| timers.html | 139.91 KB | 139.90 KB | -11.00 B (-0.01%) |
| tls.html | 409.38 KB | 409.37 KB | -11.00 B (-0.00%) |
| tracing.html | 85.14 KB | 85.13 KB | -11.00 B (-0.01%) |
| tty.html | 99.22 KB | 99.21 KB | -11.00 B (-0.01%) |
| typescript.html | 53.36 KB | 53.35 KB | -11.00 B (-0.02%) |
| url.html | 364.08 KB | 364.07 KB | -11.00 B (-0.00%) |
| util.html | 735.88 KB | 735.87 KB | -11.00 B (-0.00%) |
| v8.html | 359.11 KB | 359.09 KB | -11.00 B (-0.00%) |
| vfs.html | 84.80 KB | 84.79 KB | -11.00 B (-0.01%) |
| vm.html | 395.92 KB | 395.91 KB | -11.00 B (-0.00%) |
| wasi.html | 71.60 KB | 71.59 KB | -11.00 B (-0.02%) |
| webcrypto.html | 600.95 KB | 600.94 KB | -11.00 B (-0.00%) |
| webstreams.html | 398.21 KB | 398.20 KB | -11.00 B (-0.00%) |
| worker_threads.html | 394.00 KB | 393.99 KB | -11.00 B (-0.00%) |
| zlib.html | 376.37 KB | 376.36 KB | -11.00 B (-0.00%) |

Performance

Metric Base Head Diff
Elapsed time 77.88 s 73.18 s -4.70 s (-6.03%)
User CPU time 161.49 s 156.36 s -5.13 s (-3.18%)
System CPU time 4.90 s 4.36 s -540.00 ms (-11.02%)
Peak resident memory 5.59 GB 5.52 GB -76.03 MB (-1.33%)

@bmuenzenmeyer bmuenzenmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally works, but I want to align on how to move through this change management.

Comment thread .changeset/opt-out-banners.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants